package com.zx.pm.service.impl;

import java.util.List;
import com.zx.common.utils.DateUtils;
import com.zx.pm.service.ReviewProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zx.pm.mapper.ReviewProjectMapper;
import com.zx.pm.domain.ReviewProject;

/**
 * 评审项目信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-08
 */
@Service
public class ReviewProjectServiceImpl implements ReviewProjectService
{
    @Autowired
    private ReviewProjectMapper reviewProjectMapper;

    /**
     * 查询评审项目信息
     *
     * @param id 评审项目信息主键
     * @return 评审项目信息
     */
    @Override
    public ReviewProject selectReviewProjectById(Long id)
    {
        return reviewProjectMapper.selectReviewProjectById(id);
    }

    /**
     * 查询评审项目信息列表
     *
     * @param reviewProject 评审项目信息
     * @return 评审项目信息
     */
    @Override
    public List<ReviewProject> selectReviewProjectList(ReviewProject reviewProject)
    {
        return reviewProjectMapper.selectReviewProjectList(reviewProject);
    }

    /**
     * 新增评审项目信息
     *
     * @param reviewProject 评审项目信息
     * @return 结果
     */
    @Override
    public int insertReviewProject(ReviewProject reviewProject)
    {
        reviewProject.setCreateTime(DateUtils.getNowDate());
        return reviewProjectMapper.insertReviewProject(reviewProject);
    }

    /**
     * 修改评审项目信息
     *
     * @param reviewProject 评审项目信息
     * @return 结果
     */
    @Override
    public int updateReviewProject(ReviewProject reviewProject)
    {
        reviewProject.setUpdateTime(DateUtils.getNowDate());
        return reviewProjectMapper.updateReviewProject(reviewProject);
    }

    /**
     * 批量删除评审项目信息
     *
     * @param ids 需要删除的评审项目信息主键
     * @return 结果
     */
    @Override
    public int deleteReviewProjectByIds(Long[] ids)
    {
        return reviewProjectMapper.deleteReviewProjectByIds(ids);
    }

    /**
     * 删除评审项目信息信息
     *
     * @param id 评审项目信息主键
     * @return 结果
     */
    @Override
    public int deleteReviewProjectById(Long id)
    {
        return reviewProjectMapper.deleteReviewProjectById(id);
    }
}
